[index]

SelectedChunk Function

Syntax

the selectedChunk or selectedChunk()

Description

The selectedChunk() function returns a reference to the currently selected text in the form: char <number> to <number> of <card | bg> field <id#> If no text is selected, selectedChunk returns the position of the insertion point in a card or background field, or empty if no insertion point is placed.

Examples

Create a field and type the following line into it: The weather has been very disappointing as of late. Create a button and name it "Selector". Add the following handler to the button's script: on mouseUp put the selectedChunk end mouseUp Now, select the word weather and click on the button. To obtain the actual selection, change your handler to read: on mouseUp put the value of the selectedChunk
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.